import FirstTitle from "@/components/FirstTitle";
import React, { useEffect, useState } from "react";
import EffectContainer from "@/components/effectContainer";
import { getCode } from "@/api/codeApi.ts";
import Code from "@/components/code";
import SubTitle from "@/components/subTitle";

export const TokenRefresh = () => {
  const [code, setCode] = useState("");
  useEffect(() => {
    getCode("/token无感刷新/code.txt").then(({ data }) => {
      setCode(data);
    });
  }, []);
  return (
    <>
      <FirstTitle title="Token 无感刷新" />
      <SubTitle title="自己看" />
      <EffectContainer code={<Code content={code} />} />
    </>
  );
};
